<script setup lang="ts">
import axios from '@/axios'
import {onMounted, ref, type Ref} from 'vue'
import {useRoute} from "vue-router";
import type {IShopInfo} from "@/types";

const data: Ref<IShopInfo | null> = ref(null)
const route = useRoute();
onMounted(() => {
  axios({
    url: '/goods/item/' + route.params.id,
    method: 'GET',
  }).then((r) => {
    console.log(r.data);
    data.value = r.data.info;
  })
})

</script>

<template>
  <div v-if="data" v-html="data.goods_introduce"></div>
</template>

<style scoped>

</style>